<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
   xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
   xmlns:f="http://xmlns.jcp.org/jsf/core"
   xmlns:h="http://xmlns.jcp.org/jsf/html"
   xmlns:p="http://primefaces.org/ui"
   xmlns:c="http://xmlns.jcp.org/jsp/jstl/core"
   xmlns:pe="http://primefaces.org/ui"
   template="/WEB-INF/templates/business/supplier/template.xhtml">
   
   	<f:metadata>
	   	<f:viewParam name="bulletinId" value="#{bulletinHome3.id}"></f:viewParam>
	   	<f:event listener="#{bulletinHome3.initConversation()}" type="preRenderView"></f:event>
	   	<f:viewParam name="tradeId" value="#{tradeHome.id}"></f:viewParam>
	   	<f:event listener="#{tradeHome.initConversation()}" type="preRenderView"></f:event>
   	</f:metadata>
   	<ui:define name="supplier_head">
   		<link href="#{request.getContextPath()}/starRating/css/bootstrap.css" rel="stylesheet" />
		<link href="#{request.getContextPath()}/starRating/css/font-awesome.min.css" rel="stylesheet" />
		<h:outputStylesheet name="css/stylesheet.css" />
		<h:outputStylesheet name="css/public/layout.css" />
		<h:outputStylesheet name="css/public/hover-mask.css" />
		<h:outputStylesheet name="css/public/pull-down.css" />
		<h:outputStylesheet name="css/public/first-pagemain.css" />	
		<h:outputStylesheet name="css/public/zhongjieminglu.css" />
		<link href="#{request.getContextPath()}/starRating/css/star-rating.css" rel="stylesheet" />
		<script type="text/javascript" src="#{request.getContextPath()}/starRating/js/star-rating.js"></script>
   		<style type="text/css">
   			.removeButton {
   				float: right;
   				margin-right: 20px;
   			}
   			.limitUnit{
   				margin-top:5px;
   			}
   			.label1 {
				width:200px;
				line-height:30px;	
				text-align: right;
				padding-right:20px;
				text-align: right;
			}
			
			.value {
				font-style:normal;
				font-size: 16px;
				line-height:30px;
				color:#666666;				
				text-align:left;
				padding-left:20px;
				width: 80%;
			}
			h2{
   				text-align:center
   			}
   			.rowStyle{
	   			text-align: center;
	   			font-size:16px
   			}
   		</style>
   		<script type="text/javascript">

   		</script>
   	</ui:define>
   	<ui:define name="supplier_content">
   
		<h:form id="editForm"  >         
			<p:panel id="panel" header="公告信息" style="margin-bottom:10px;">
		       <p:messages id="messages" closable="true"><p:autoUpdate/></p:messages>
		        
			   <ui:include src="/WEB-INF/templates/business/bulletinBasicInfo.xhtml" />
			</p:panel>
			
			
			<p:panel id="bulletinReqs" header="公告要求">
				<h:panelGrid columns="2" cellpadding="5"
					columnClasses="column1,column2">
					<p:outputLabel for="rootQualificationGroup" value="匹配规则" />
					<h:outputText id="rootQualificationGroup"
						style="font-size:16px;color:red"
						value="#{bulletinHome3.instance.qualificationGroup.relation.typeName}" />
				</h:panelGrid>
				<p:panel id="agentServiceReqs" header="服务事项要求"
					rendered="#{bulletinHome3.instance.qualificationGroup.getAgentServiceGroups().size() > 0}"
					style="margin-bottom:10px;">
					<p:repeat var="_serviceGroup"
						value="#{bulletinHome3.instance.qualificationGroup.getAgentServiceGroups()}"
						varStatus="_groupStatus">
						<p:panelGrid cellpadding="5"
							style=" margin-bottom: 10px;width:100%">
							<p:row style="width:100%">
								<p:column>
									<h2>服务事项要求组#{_groupStatus.index +
										1}（#{_serviceGroup.relation.typeName}组）</h2>
								</p:column>
							</p:row>

							<p:row>
								<p:column>
									<p:panelGrid cellpadding="5" style="width:100%">
										<p:row styleClass="rowStyle">
											<p:column>
																服务事项名称
															</p:column>
											<p:column>
																对应资质大类
															</p:column>
										</p:row>

										<p:repeat var="_service"
											value="#{_serviceGroup.agentServices}">
											<p:row>
												<p:column>
													<h:outputText value="#{_service.name}" />
												</p:column>
												<p:column>
													<h:outputText value="#{_service.qualificationClass.name}" />
												</p:column>
											</p:row>
										</p:repeat>
									</p:panelGrid>
								</p:column>
							</p:row>
						</p:panelGrid>
					</p:repeat>
				</p:panel>

				<p:panel id="reqs" header="资质要求"
					rendered="#{bulletinHome3.instance.qualificationGroup.getQualificationGroups().size () > 0}"
					style="margin-bottom:10px;">
					<h:outputText
						value="#{bulletinHome3.instance.qualificationGroup.getQualificationGroupDetail()}" />
				</p:panel>

			</p:panel>
			
			
			
			<p:panel id="scores" header="评价详情 " style="margin-bottom:10px;" rendered="#{not empty tradeHome.instance.tradeRating}">
		        <h:panelGrid columns="2" cellpadding="5" columnClasses="label1,value">
					<p:outputLabel  value="评分"  />
					<h:outputText value="#{tradeHome.instance.tradeRating.score}" />
		        	<p:outputLabel  value="服务质量评分"  />
		            <h:outputText value="#{tradeHome.instance.tradeRating.quality}" />
		            
		            <p:outputLabel  value="服务时限评价"  />
		            <h:outputText value="#{tradeHome.instance.tradeRating.effectiveness}" />
		            
		            <p:outputLabel  value="服务态度评价"  />
		           <h:outputText value="#{tradeHome.instance.tradeRating.attitude}" />
		            
		            <p:outputLabel  value="服务收费评价"  />
		            <h:outputText value="#{tradeHome.instance.tradeRating.charge}" />
		           
		            <p:outputLabel  value="服务规范评价"  />
		            <h:outputText value="#{tradeHome.instance.tradeRating.standard}" />
		           
		           <p:outputLabel  value="追加评价" rendered="#{not empty tradeHome.instance.tradeRating.additionalTradeRating}" />
		           <h:outputText value="#{tradeHome.instance.tradeRating.additionalTradeRating.content}" rendered="#{not empty tradeHome.instance.tradeRating.additionalTradeRating}"/>
		           

		        </h:panelGrid>
			 
			</p:panel>
			
		</h:form>
		
		
   	</ui:define>
</ui:composition>
